perm filename XAP.BGB[UP,DOC]3 blob sn#090109 filedate 1974-03-04 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00008 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	USER PROGRAM DOCUMENTATION				OCTOBER 1973
C00004 00003	INTRODUCTION:
C00008 00004	ESCAPE CHARACTER:
C00011 00005	FONT SELECT DELIMITERS:
C00015 00006	CARRIAGE CONTROL COMMMANDS.
C00016 00007	VECTORS:
C00020 00008	TEXT JUSTIFICATION:
C00024 ENDMK
C⊗;
USER PROGRAM DOCUMENTATION				OCTOBER 1973

                   XAP - XEROX ASSEMBLE AND PRINT.

                          BRUCE G. BAUMGART

ABSTRACT:

	XAP converts files of text,  III buffers,  graphics and video
into binary image rasters which are then printed on the XGP.


CONTENTS:

		1. INTRODUCTION.

		2. THE XGP RASTER.

		3. THE ESCAPE CHARACTER.

		4. FONT DECLARATION AND SELECTION.

		5. INDIRECT FILES.

		6. VECTORS AND GRAPHICS.

		7. TEXT JUSTIFICATION.














_____________________________________________________________________
This  research  was  supported  in  part  by  the  Advanced  Research
Projects  Agency of  the  Office of  the Secretary  of  Defense under
Contract No. SD-183.

The views and  conclusions contained  in this document  are those  of
the author and should not  be interpreted as necessarily representing
the  official policies, either expressed or  implied, of the Advanced
Research Project Agency or the United States Government.
INTRODUCTION:
_____________________________________________________________________

	XAP  (pronouced  "zap")  is converts  files  of  text,    III
buffers,   graphics  and video  into binary  image rasters  which are
then printed on the XGP.   The following monitor commands will  cause
the easy things to be done:

	R XAP;@TEXT		Will output a text file.
	R XAP;⊗III		Will output a III display buffer.
	R XAP;⊗VIDEO		Will output a H.E. format TV picture.

	XAP's was intended to be low level  kind of PUB; however only
an  alternate kind  of POX  was achieved.   XAP can  output justified
text,  III files,  VIDEO files,  and simple graphics.  However unlike
PUB and POX;  XAP does not make an intermediate  DSK file, but rather
outputs directly to the XGP.

	The XAP input  scanner has a  command mode and a  print mode.
The  scanner rescans the monitor  command line and  starts taking XAP
commands  following  the  first  semicolon.  The  only  commands  for
entering text  mode are  select-font F<i>  and text  file indirection
"@".  In text mode,  characters are  usually printed into  an XGP bit
raster; the text  mode is  escaped to command  mode by the  character
tilde; ascii 32.


THE XGP PAGE RASTER:
_____________________________________________________________________
	The logical  page size  is 2048  rows by  1728 columns.   The
physical page size  is 8.5" by 11". Although (49 words per row)*(2048
rows) =  100352 words;  steps have  been taken  so that  a 100K  core
image is not  required. The XGP is  adjusted so that a  single row or
column  is one  two hundreth of  an inch wide;  which is  the same as
saying that  there are 200  rows (or  columns) to  an inch. Now  2048
rows comes to 10.24 inch,  and so there is three eighths inchs at the
top and the bottom  of a XAP page  which are inaccessible; also  1728
columns comes to 8.64 inchs  so columns 0 to 15 are off  the paper to
the left and columns 1680 to 1727 are off the paper to the right.
ESCAPE CHARACTER:
_____________________________________________________________________
	The  XAP escape  character  is  tilde,  ASCII 32  octal.  The
escape  character  terminates TEXT-MODE  and returns  control  to the
command scanner which is COMMAND-MODE.


FONT SPECIFICATION:
_____________________________________________________________________
F<i>			Select font number <n> and enter Text mode.
M<i><font file name>;	Make font number <n> out of filename.

	If a  font  select command  "F" is  done before  a make  font
command; then  the following default font names  will be used for the
corresponding font numerals:

Numeral		Default Font numeral's file name.

	0	<nothing>	Ron Ziegler Font for "inoperative" text.
	1	LPT		Line Printer Default.

	2	FIX13X		Fixed Width Font.
	3	FIX20
	4	FIX25
	5	FIX30
	6	FIX40

	7	NGR13		New Gothic Roman.
	8	NGR20
	9	NGR25
	A	NGR30
	B	NGR40

	C	BDR25		Bodoni Roman.
	D	BDI25		Bodoni Italics.

	E	XMAS25		Pseudo Olde English
	F	SIGN57		Large title font.
	G	GRK25		Greek
	H	SET1		Tovar's creation.
	I	SUB		Subscript
	J	SUP		Super script

	Thus if  you  use the  default fonts,    you do  not have  to
declare any  font file names; but  if you do a  "Make a font" command
the default filename is lost. In either event, a font is  selected by
the capital-F  command followed by  a font numeral. Starting  in text
mode,  the sequence  to  change a  font is  "<tilde>F<numeral>" which
will select the desired font and re-enter text mode.
FONT SELECT DELIMITERS:
_____________________________________________________________________
	The five pairs  of characters: curly brackets,   parentheses,
square  brackets,   horizontal horse shoes  and angle-bars;  are font
select  delimiters.  In  command   mode,  the  left  delimiters   are
declaration commands that take a  font numeral argument. For example,
to  declare subscripts under  square brakets; an  italics under curly
brakets; and  Christmas under the  angle-bars the following  commands
would be used:

	<tilde>[I;{C;≤E;F.

	TEST: ≤OLDE ENGLISH CHRISTMAS≥  A[1,2] + B[X+B] = C[π/2]
	TEST {TEST}	TEST {TEST}	TEST {TEST}

FONT CHARACTERISTICS: SIZE, STYLE, THICKNESS.
_____________________________________________________________________
	The proliferation of  font file names can be  comprehended by
understanding  the  abbreviations  for  the  features  that are  most
variable: size, style and thickness.

	Most font  file names include  the numerals 13,   25,  30, or
40;  which is the  maximum height  of the font  in XGP units.  An XGP
unit is 1/200 of an inch; the usual printer's measure is  the "point"
which is  a 1/72  of an  inch; traditional type  font sizes  also are
refered to by the names given in the following table:

   SIZE NAME		POINTS		XGP-UNITS    CLOSEST XGP-SIZE

   Diamond		4.5		12.50		13
   Bourgeois		9		25		25
   Small Pica		11		30.56		30
   Pica			12		33.33
   English		14		38.89		40
   Columbian		16		44.45
   Great Primer		18		50

	The thickness of the font may be denoted by X-extra thick;
L-light; and I-italics.

INDIRECT FILE COMMANDS:
_____________________________________________________________________
@<filename>;	Print text starting at XGP pen postion.
⊗<filename>;	Place upper left of image at XGP pen position.
*<filename>;	Place center of image at XGP pen position.

	The "@" indirect command causes XAP
to start printing the contents of the specified text file.
The "⊗" and "*" indicate a binary picture file; video files are
distinguished from III display files because the first word of a
video file is [-1] and the first word of a III display file is
a positive word count. The "⊗" circle cross indirection places the
upper left most corner of the picture at the current XGP beam position;
while the "*" asterisk indirection places the center of the picture
at the current XGP beam position.
CARRIAGE CONTROL COMMMANDS.
---------------------------------------------------------------------
λ<integer>
VECTORS:
_____________________________________________________________________
	V<row>,<column>;	Absolute visible vector.
	I<row>,<column>;	Absolute invisible vector.
	
The row and column arguments are ASCII decimal numerals.

   C<radius>,<arc-displacement>,<arc-length>;	Circular arc.
   R<radius1>,<arc-displacement>,<radius2>;	Radial vector.
   A<xlo>,<xhi>,<coef0>,<coef1>,...,<coefN>;	Arc polynomial.


GRAPHICS FIGURES:
_____________________________________________________________________
	B<dx>;		Square Box.
	B<dx>,<dy>;	Rectangular Box.
	D<dx>;		Square Diamond.
	D<dx>,<dy>;	Diamond.

	C<radius>;		Circle.
	E<radius1>,<radius2>;	Ellipse.
	H<radius1>,<radius2>;	Hyperbola.

	C<radius>,<arc-length>;			Circular arc.
	E<radius1>,<radius2>,<x1>,<x2>;		Elliptical arc 
						from X1 to X2 and Y ≥ 0.
	H<radius1>,<radius2>,<x1>,<x2>;		Hyperbolic arc
						from X1 to X2 and Y ≥ 0.

	O<arc>;		Orientation about origin.
	L<x>,<y>;	Locate locus of orgin.
	X<scalex>;	XGP units per delta X unit.
	Y<scaley>;	XGP units per delta Y unit.

	The "B" command  with one real  argument prints a  square box
centered  at the XGP beam  position whoes half width  (radius) is the
given number  of XGP  pixels.   The "B"  command  with two  arguments
prints a  rectangle centered  at the current  XGP beam  position. The
"Box"  command as well  as the  "Diamond",  "Circle",   "Ellipse" and
"Hyperbola" commands do not change the pseudo XGP  beam position. The
"D" diamond command  works like "B" box taking  one or two arguments;
if the second argument  is missing it is  assumed to be identical  to
the first argument.

	The "C" circle, "E"  ellipse and "H" hyperbola are  very much
alike  because they are  executed by  the same mechanism.  The circle
command with one argument draws a circle centered at the  current XGP
raster  position.  The  "E"  and  "H"  commands  with  two  arguments
automatically  plot both the upper (greater  than zero) and the lower
(less than  zero)  part  of the  appropriate  conic centered  at  the
current  beam position  with  the X-axis  radius given  by  the first
argument and the Y-axis radius given by the second argument.
TEXT JUSTIFICATION:
_____________________________________________________________________

	There are three  text justification modes:  justify automatic
carriage  return  linefeed  mode;  justify  video  mode;  and justify
usual to fill to the left and right margins.

JA;	Justify Automatic CRLF Mode.

	Extra carriage returns are provided when the right margin
	is exceeded; and extra form feeds are provided when the
	bottom margin is exceeded.

JV;	Justify Video Mode.

	Characters "appearing" beyond the margins are lost.
	
JU;	Justify Usual Mode.

	Full normal left and right justification. A paragraph
is started with a TAB and terminated by one of five conditions:
1. CRLF CRLF; 2. CRLF TAB; 3. ESCAPE CHARACTER;	4. FORM FEED;
or 5. END OF FILE.